import numpy as np
a1 = np.arange(16)
a1 = a1.reshape(4,4)
print(a1)
print(a1.shape)
a1 = a1.reshape(16,)
print(a1)
a2 =np.arange(32)

a2 = a2.reshape(4,4,2)
print(a2.shape[2])

#  转换为一维数组
a2 = a2.flatten()
print(a2)

a3 = np.array(range(8))
a3 = a3.reshape(4,2)
a4 = np.array([1,5])
print(a3+2)
print(a3+a4)
